-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable the reuse of cached informers on creation by SharedInformerFactory
.
#3856
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Sud0x67 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @Sud0x67! |
/test |
@Sud0x67: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@k8s-ci-robot /test |
@k8s-ci-robot /easycla |
@k8s-ci-robot /check-cla |
1 similar comment
@k8s-ci-robot /check-cla |
a9ecf71
to
8973a20
Compare
This PR introduces a new constructor parameter,
reuseExistingCachedInformer
, to the SharedInformerFactory.The aim is to facilitate the reuse of existing cached informers when creating informers through SharedInformerFactory.
Currently, SharedInformerFactory caches only the first informer created for each API type. Developers who wish to avoid creating a new informer each time must first call SharedInformerFactory#getExistingSharedIndexInformer before proceeding with creation.
By setting reuseExistingCachedInformer to true, SharedInformerFactory will automatically reuse existing cached informers instead of creating new ones. This approach simplifies the process and clearly indicates whether to utilize the cached factory, thereby reducing potential confusion.
The discussion can be found here Issue